Q =require 'q'
fs =require 'fs'
###
a=Q.fcall ()->
  return 10
console.log 'a is:',a
###

# Q.nfcall node-js style functions
Q.nfcall(fs.readFile,'file1/input.txt')
  .then(
    (result,cb)->
      console.log 'the result is:',result.toString()
  )
  .catch(
    (err)->
      console.log 'error is:',err
  )
